#pragma once
#include "ASN1Encodable.h"

namespace AppliedCryptography
{
	class ASN1UTCTime : public ASN1Encodable
	{
	private:
		time_t _datetime;

	protected:
		ASN1UTCTime(ClassBits classBits, ConstructedBit constucted, TypeNumberBits number);

	public:
		ASN1UTCTime();
		explicit ASN1UTCTime(const std::string& time);

	public:
		virtual ASN1UTCTime& set(const std::string& time);
		virtual tm get() const;
		virtual std::string getString(std::string& format) const;
		virtual std::vector<byte> getContentBits() const;

	private:
		tm convertTime(const time_t &time) const;
	};
}; // namespace AppliedCryptography
